package com.lx.blog.web;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.lx.blog.dao.UserMapper;
import com.lx.blog.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("hello")
public class HelloDo {

    @Autowired
    UserMapper userMapper;

    @RequestMapping("user")
    public List<User> user() {
        LambdaQueryWrapper<User> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(User::getName, "w");
        return userMapper.selectList(wrapper);
    }
}
